<template>
  <div>

  </div>
</template>
<script setup lang="ts">
//泛型
// const calcArray = (data: any) => {
//   let list = [];
//   for (let i = 0; i < 3; i++) {
//     list.push(data)
//   }
//   return list
// }
// calcArray("d")
// calcArray(1)



const calcArray = <T>(data:T):T[] => {
  let list:T[] = [];
  for (let i = 0; i < 3; i++) {
    list.push(data)
  }
  return list
}
calcArray<string>("d")
calcArray<number>(1)

</script>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
